<!DOCTYPE html>
<html>
<head>
<title>代理列表</title>
    <#include "/header.html">
		<link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
		<link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
		<script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
		<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
		<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
		<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
		<script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
		<style>
			.logo {
				display: inline-block;
				text-align: center;
				margin-right: 15px;
			}
			.logo .logo_img{
				width: 100px;
				height: 100px;
				display: block;
			}
			.logo .upload_file {
				position: absolute;
				top: 0;
				width: 150px;
				height: 150px;
				opacity: 0;
			}


			.upload {
				margin: 5px 0 15px 0px;
			}

			.upload-button {
				position: fixed;
				bottom: 0px;
				right: 20px;
			}
		</style>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">

			<!--<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.name" placeholder="请输入代理姓名">
			</div>
			<a class="btn btn-default" @click="query">查询</a>-->

            <#if shiro.hasPermission("sys:proxylist:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <!--<#if shiro.hasPermission("sys:proxylist:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>-->

		</div>

		<table id="menuTable" data-mobile-responsive="true" data-click-to-select="true">
			<thead>
			<tr>
				<th data-field="selectItem" data-checkbox="true"></th>
			</tr>
			</thead>
		</table>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal"  id="ueditorForm" action="" method="post" enctype="multipart/form-data">

			<div class="form-group">
				<div class="col-sm-2 control-label">姓名</div>
				<div class="col-sm-8">
					<input type="text" class="form-control" v-model="proxylist.name" placeholder="姓名" disabled="disabled"/>
				</div>
			</div>
			<br/>
			<div id="images" class="form-group">
				<div class="col-sm-2 control-label">用户头像</div>
				<div class="logo">
					<img @click="preview" src="../../statics/img/addPhoto.svg" layer-src="../../statics/img/addPhoto.svg" class="logo_img">
					<!--<a class="btn btn-primary btn-xs upload">上传</a>-->
				</div>
			</div>
			<br/>
			<div class="form-group">
				<div class="col-sm-2 control-label">电话</div>
				<div class="col-sm-8">
					<input type="text" class="form-control" v-model="proxylist.phone" placeholder="电话" disabled="disabled"/>
				</div>
			</div>
			<br/>
			<div class="form-group">
				<div class="col-sm-2 control-label">密码</div>
				<div class="col-sm-8">
					<input type="text" class="form-control" v-model="proxylist.password" placeholder="密码" disabled="disabled"/>
				</div>
			</div>
			<br/>
			<div class="form-group">
				<div class="col-sm-2 control-label">用户状态</div>
				<div class="form-group col-sm-8">
					<select class="form-control" v-model="proxylist.status">
						<option value="1">启用</option>
						<option value="2" >禁用</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">用户角色</div>
				<div class="form-group col-sm-8">
					<select class="form-control" v-model="proxylist.role" disabled="disabled">
						<option value="1" >省代理</option>
						<option value="2" >市代理</option>
						<option value="3" >区代理</option>
						<option value="4" >个人代理</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label">代理城市</div>
				<div class="col-sm-8">
					<input type="text" class="form-control" v-model="proxylist.city" placeholder="代理城市" disabled="disabled"/>
				</div>
			</div>
			<br/>
			<div class="form-group">
				<div class="col-sm-2 control-label">佣金类型</div>
				<div class="form-group col-sm-8">
					<select class="form-control" v-model="proxylist.commissionType" id="commType" @click="commValue" >
						<option value="1" >按比例</option>
						<option value="2" >按金额</option>
					</select>
				</div>
			</div>

				<div class="form-group" v-if="proxylist.commissionType == 1">
					<div class="col-sm-2 control-label">分佣值(%)</div>
					<div class="col-sm-8">
						<input type="text" class="form-control" v-model="proxylist.commissionValue" placeholder="分佣值"/>
					</div>
				</div>

				<div class="form-group" v-if="proxylist.commissionType == 2">
					<div class="col-sm-2 control-label">分佣值(元)</div>
					<div class="col-sm-8">
						<input type="text" class="form-control" v-model="proxylist.commissionValue" placeholder="分佣值"/>
					</div>
				</div>


			<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
<script src="${request.contextPath}/statics/js/modules/sys/proxylist.js?_${.now?long}"></script>

</body>
</html>